package com.atguigu.educms.controller;

import com.atguigu.commonutils.R;
import com.atguigu.educms.entity.CrmBanner;
import com.atguigu.educms.service.CrmBannerService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/educms/crm-banner-front")
public class UserBannerController {

    @Autowired
    private CrmBannerService crmBannerService;

    //查询所有轮播图
    @GetMapping("getAllBanner")
    public R getAllBanner(){
        List<CrmBanner> list =  crmBannerService.selectAllBanner();
        return R.ok().data("list",list);
    }

}
